package com.cmnit.analysis.dao

import com.cmnit.analysis.common.{TDao, TSql}
import org.apache.log4j.Logger
import org.apache.spark.sql.DataFrame

class DayTollClearingDao extends TSql with TDao {
  private val logger: Logger = Logger.getLogger(this.getClass)

  /**
   * 日清分结果表
   */
  def dayTollClearingInfo(sqlTime: String): DataFrame = {
    sparkSQL(
      "SELECT " +
        "workdate, " +
        "stationid, " +
        "roadid, " +
        "owerid, " +
        "cropid, " +
        "SUBSTR(cleardate,0,10) cleardate, " +
        "paytype, " +
        "receivablemoney, " +
        "actuamoney, " +
        "remitaccountdate, " +
        "transflag, " +
        "vclass, " +
        "sumdate, " +
        "reportformmonth, " +
        "batchnum, " +
        "nationcleardate " +
        "FROM " +
        "clear.tbl_daytollclearing " +
        "WHERE "
        + sqlTime
    )
  }
}
